#include "presetobject.h"

PresetObject::PresetObject()
{
}

PresetObject::PresetObject(const PresetObject &rhs)
{
    if (this != &rhs)
    {
        *this = rhs;
    }
}

PresetObject::PresetObject(int key, const QString &keyName, const QVariant &defaultValue)
{
    m_presetKey = key;
    m_keyName = keyName;
    m_defaultData = defaultValue;
    m_data = defaultValue;
}

void PresetObject::setData(const QString &inputData)
{
    m_data = inputData;
}

int PresetObject::getIntData() const
{
    return m_data.toInt();
}

bool PresetObject::getBoolData() const
{
    return m_data.toBool();
}

double PresetObject::getDoubleData() const
{
    return m_data.toDouble();
}

QString PresetObject::getStringData() const
{
    return m_data.toString();
}

void PresetObject::restoreDefaultValue()
{
    m_data = m_defaultData;
}

QString PresetObject::getDefaultData() const
{
    return m_defaultData.toString();
}

void PresetObject::setDefaultData(const QString &value)
{
    m_defaultData = value;
}

int PresetObject::getKey() const
{
    return this->m_presetKey;
}

QString PresetObject::getKeyName() const
{
    return this->m_keyName;
}

